/**
 * Copyright &copy; 2012-2013 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 */
package net.huashitong.shiro;

import javax.servlet.http.HttpServletRequest;

/**
 * 用户和密码（包含验证码）令牌类
 *
 * @author ThinkGem
 * @version 2013-5-19
 */
public class UsernamePasswordToken extends org.apache.shiro.authc.UsernamePasswordToken {

    private static final long serialVersionUID = 1L;

    private String captcha;

    private String loginMode = "username";//登录方式

    private HttpServletRequest request;

    private String mobile; //手机号

    public String getCaptcha() {
        return captcha;
    }

    public void setCaptcha(String captcha) {
        this.captcha = captcha;
    }

    public String getLoginMode() {
        return loginMode;
    }

    public void setLoginMode(String loginMode) {
        this.loginMode = loginMode;
    }

    public HttpServletRequest getRequest() {
        return request;
    }

    public void setRequest(HttpServletRequest request) {
        this.request = request;
    }

    public String getMobile() { return mobile; }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public UsernamePasswordToken() {
        super();
    }

    public UsernamePasswordToken(String username, char[] password,
                                 boolean rememberMe, String host, String captcha) {
        super(username, password, rememberMe, host);
        this.captcha = captcha;
    }

    public UsernamePasswordToken(String username, char[] password,
                                 boolean rememberMe) {
        super(username, password, rememberMe);
    }

    public UsernamePasswordToken(String username, char[] password,
                                 boolean rememberMe, String loginMode) {
        super(username, password, rememberMe);
        this.loginMode = loginMode;
    }

    public UsernamePasswordToken(String username, char[] password,
                                 boolean rememberMe, String loginMode,
                                 HttpServletRequest request, String mobile) {
        super(username, password, rememberMe);
        this.loginMode = loginMode;
        this.request = request;
        this.mobile = mobile;
    }


}